FIND_PATH(NIKINECT_INCLUDE_DIR XnOpenNI.h)
FIND_LIBRARY(NIKINECT_LIBRARY NAMES openNI openNI64)

IF(NIKINECT_INCLUDE_DIR AND NIKINECT_LIBRARY)
    SET(EXTERNAL_INCLUDE_DIR ${NIKINECT_INCLUDE_DIR})
    SET(EXTERNAL_LIBRARIES ${NIKINECT_LIBRARY})
    
    SET(EXAMPLE_NAME osgnikinect)
    SET(EXAMPLE_FILES osgnikinect.cpp KinectHandler.cpp)
    START_EXAMPLE()
ENDIF(NIKINECT_INCLUDE_DIR AND NIKINECT_LIBRARY)
